<script setup>

import {ref, onMounted} from "vue";
import {getUpdateLog} from "@/apis/updatelog";

const logList = ref([])

onMounted(() => {
  getUpdateLog()
      .then(res => {
        const {code, data} = res.data;
        if (code === 1) {
          logList.value = data;
        }
      })
})

</script>

<template>
  <main>
    <t-steps readonly :current="logList.length" sequence="reverse" layout="vertical" theme="dot">
      <t-step-item
          v-for="(item, index) in logList"
          :key="index"
          :title="item.title"
      >
        <template #content>
          <div v-html="item.content"></div>
        </template>
      </t-step-item>
    </t-steps>
  </main>
</template>

<style scoped lang="less">
main {
  padding: 6px;
}
</style>